fix an incorrect assertion that the "valid" flag is always correct in a
authorHavoc Pennington <hp@pobox.com>
Mon, 31 Dec 2001 22:17:26 +0000 (22:17 +0000)
committerHavoc Pennington <hp@src.gnome.org>
Mon, 31 Dec 2001 22:17:26 +0000 (22:17 +0000)
2001-12-31  Havoc Pennington  <hp@pobox.com>

* gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency):
fix an incorrect assertion that the "valid" flag is always correct
in a node and add explanatory comment. This keeps me from
reproducing #59101, but I'm remembering that 59101 was actually
about incorrect pixel totals, so I'm not sure 59101 is actually
fixed. May just have stopped happening due to some change in
how C-k works.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktextbtree.c

index 04e2b898c6c9689b57b878168bd211ee1822673f..129389c62ee3bbb99859c5f9328a23d708379257 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2001-12-31  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency):
+       fix an incorrect assertion that the "valid" flag is always correct
+       in a node and add explanatory comment. This keeps me from 
+       reproducing #59101, but I'm remembering that 59101 was actually 
+       about incorrect pixel totals, so I'm not sure 59101 is actually 
+       fixed. May just have stopped happening due to some change in 
+       how C-k works.
+
 2001-12-31  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend
index 04e2b898c6c9689b57b878168bd211ee1822673f..129389c62ee3bbb99859c5f9328a23d708379257 100644 (file)
@@ -1,3 +1,13 @@
+2001-12-31  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency):
+       fix an incorrect assertion that the "valid" flag is always correct
+       in a node and add explanatory comment. This keeps me from 
+       reproducing #59101, but I'm remembering that 59101 was actually 
+       about incorrect pixel totals, so I'm not sure 59101 is actually 
+       fixed. May just have stopped happening due to some change in 
+       how C-k works.
+
 2001-12-31  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend
index 04e2b898c6c9689b57b878168bd211ee1822673f..129389c62ee3bbb99859c5f9328a23d708379257 100644 (file)
@@ -1,3 +1,13 @@
+2001-12-31  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency):
+       fix an incorrect assertion that the "valid" flag is always correct
+       in a node and add explanatory comment. This keeps me from 
+       reproducing #59101, but I'm remembering that 59101 was actually 
+       about incorrect pixel totals, so I'm not sure 59101 is actually 
+       fixed. May just have stopped happening due to some change in 
+       how C-k works.
+
 2001-12-31  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend
index 04e2b898c6c9689b57b878168bd211ee1822673f..129389c62ee3bbb99859c5f9328a23d708379257 100644 (file)
@@ -1,3 +1,13 @@
+2001-12-31  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency):
+       fix an incorrect assertion that the "valid" flag is always correct
+       in a node and add explanatory comment. This keeps me from 
+       reproducing #59101, but I'm remembering that 59101 was actually 
+       about incorrect pixel totals, so I'm not sure 59101 is actually 
+       fixed. May just have stopped happening due to some change in 
+       how C-k works.
+
 2001-12-31  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend
index 04e2b898c6c9689b57b878168bd211ee1822673f..129389c62ee3bbb99859c5f9328a23d708379257 100644 (file)
@@ -1,3 +1,13 @@
+2001-12-31  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency):
+       fix an incorrect assertion that the "valid" flag is always correct
+       in a node and add explanatory comment. This keeps me from 
+       reproducing #59101, but I'm remembering that 59101 was actually 
+       about incorrect pixel totals, so I'm not sure 59101 is actually 
+       fixed. May just have stopped happening due to some change in 
+       how C-k works.
+
 2001-12-31  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend
index 04e2b898c6c9689b57b878168bd211ee1822673f..129389c62ee3bbb99859c5f9328a23d708379257 100644 (file)
@@ -1,3 +1,13 @@
+2001-12-31  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency):
+       fix an incorrect assertion that the "valid" flag is always correct
+       in a node and add explanatory comment. This keeps me from 
+       reproducing #59101, but I'm remembering that 59101 was actually 
+       about incorrect pixel totals, so I'm not sure 59101 is actually 
+       fixed. May just have stopped happening due to some change in 
+       how C-k works.
+
 2001-12-31  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend
index 04e2b898c6c9689b57b878168bd211ee1822673f..129389c62ee3bbb99859c5f9328a23d708379257 100644 (file)
@@ -1,3 +1,13 @@
+2001-12-31  Havoc Pennington  <hp@pobox.com>
+
+       * gtk/gtktextbtree.c (gtk_text_btree_node_view_check_consistency):
+       fix an incorrect assertion that the "valid" flag is always correct
+       in a node and add explanatory comment. This keeps me from 
+       reproducing #59101, but I'm remembering that 59101 was actually 
+       about incorrect pixel totals, so I'm not sure 59101 is actually 
+       fixed. May just have stopped happening due to some change in 
+       how C-k works.
+
 2001-12-31  Havoc Pennington  <hp@pobox.com>
 
        * gtk/gtktextview.c (gtk_text_view_start_selection_drag): extend
index 87713ff40b41f131f9141c8b0dbf8d2ad558e49e..3cabfc72725b1e7c962ef3da0abad14d3f1ba3b7 100644 (file)
@@ -6431,9 +6431,20 @@ gtk_text_btree_node_view_check_consistency (GtkTextBTree     *tree,
   
   gtk_text_btree_node_compute_view_aggregates (node, nd->view_id,
                                                &width, &height, &valid);
+
+  /* valid aggregate not checked the same as width/height, because on
+   * btree rebalance we can have invalid nodes where all lines below
+   * them are actually valid, due to moving lines around between
+   * nodes.
+   *
+   * The guarantee is that if there are invalid lines the node is
+   * invalid - we don't guarantee that if the node is invalid there
+   * are invalid lines.
+   */
+  
   if (nd->width != width ||
       nd->height != height ||
-      !nd->valid != !valid)
+      (nd->valid && !valid))
     {
       g_error ("Node aggregates for view %p are invalid:\n"
                "Are (%d,%d,%s), should be (%d,%d,%s)",